1. Field of Application
The present invention relates in general to A/D (analog-to-digital) conversion of an analog signal to a digital signal, and in particular to an A/D conversion processing apparatus which applies digital processing to exclude the effects of noise in the analog signal from the digital signal.
2. Description of Prior Art
In the prior art, for example in the case of an electronic control apparatus such as an engine ECU (electronic control unit) of a vehicle, a number of signals are acquired by the ECU and subjected to various forms of processing, with the signals being produced by respective sensors which detect the engine operating condition. Some of these signals, such as those of a crank angle sensor or engine speed sensor may be digital signals, while others are analog signals, such as those from an air intake rate sensor, a throttle position sensor, water temperature sensor, etc. The processing results derived by the ECU are used to control fuel injection and ignition timing, etc., of the vehicle engine. Since the operation of the ECU is based on a microcomputer, which cannot directly use analog signals, these are converted to respective digital signals by an A/D converter.
Such a vehicle ECU must operate in an environment in which high levels of electrical noise are generated, such as spark noise from the ignition system, noise produced by switching operation of power transistors, noise produced from motor brushes, noise in the form of induced currents resulting from external magnetic fields such as those of a starter motor, etc.
For that reason, in the prior art, each analog signal that is to be subjected to A/D conversion in a vehicle ECU is first subjected to noise removal processing by filtering, using a filter circuit such as an RC (resistor and capacitor) filter, before being inputted to the A/D converter. However in recent years, there has been a substantial increase in the extent to which control of the engine and other equipment of a vehicle is performed by an ECU, with a corresponding increase in the number of analog signals that must be acquired and processed. If it is necessary to provide respective filter circuits for each of the analog signals then the scale and manufacturing cost of the ECU becomes substantially increased.
For that reason, it has been proposed in the prior art to omit these analog filter circuits, and to perform direct removal of noise from the digital signals produced by the A/D converter, i.e., by a digital noise removal method. Such methods are described for example in Japanese Patent Laid-open No. 11-62689 and Japanese Patent Nos. 2852059 and 2828106, which will be referred to in the following as reference 1, reference 2 and reference 3, respectively.
In the following, the term “control input data” refers to a series of digital values (i.e., control input values) that are derived based on A/D conversion and are used for control purposes, e.g., are supplied to a microcomputer which performs control operations of an ECU.
In the case of reference 1, the difference between the immediately preceding A/D converted value (i.e., digital value produced by an A/D converter) and the currently derived A/D converted value is obtained as the currently derived difference value DIF1. If DIF1 does not exceed the immediately precedingly derived difference value DIF0 by more than a predetermined amount, then DIF1 is used as the currently derived control input value. If DIF1 exceeds DIF0 by more than the predetermined amount, then this is taken to indicate that the magnitude of DIF1 has resulted from noise, and is not to be used as the currently derived control input value. Instead, the immediately precedingly derived difference value DIF0 is outputted in place of DIF1.
In the case of reference 2, instead of the usual manner of sampling the input analog signal once in each of successive time intervals, to perform successive A/D conversions, a set of two or more samples is derived once in each of successive time intervals, so that successive sets of A/D converted values are obtained. Within each set, the number of values and the period between deriving successive values are determined such as to attempt to ensure that there will be only a low probability that more than one A/D converted value within the set will be affected by noise. That is to say, there should be only a low probability that two or more successive noise peaks or bursts contained in the input analog signal will occur within the duration of one of these sets of A/D converted values. The values in each set are mutually compared, and if one of these is excessively different from the other values in the set, then it is judged to be a result of noise, and is discarded. The currently derived control input value is then obtained as the average of the remaining values in that set. If none of the values in a set is excessively different from the others, then the average of the values in the set is obtained, as the currently derived control input value.
In the case of reference 3, each of a plurality of successively obtained A/D converted values is compared with a previously derived control input value, and the A/D converted value for which the smallest amount of difference is obtained is utilized as the currently derived control input value.
However each of the techniques of references 1 to 3 have disadvantages. Firstly in the case of reference 1, it is difficult to establish a suitable value for the aforementioned predetermined amount that is used as a basis for comparison. If that amount is made excessively large, then noise will not be accurately detected, while conversely if the amount is too small, then sudden changes in the input analog signal will be erroneously detected as noise.
In the case of reference 2, it is necessary to ensure that there is no more than one abnormal value (i.e., which has been affected by noise) within each of the aforementioned sets of A/D converted values. Hence it is difficult to apply such a method to a system in which input analog signals having various different noise characteristics must be processed.
For example as illustrated in FIG. 22A, if there are two or more abnormal values within the set of A/D converted values that is currently being processed, then the noise reduction effectiveness is greatly decreased. Specifically, with the values AD1, AD2 and AD3 being currently processed as a set, there are values (AD2, AD3) that are abnormally high as a result of noise. If, as shown, the difference between these two abnormal values AD2, AD3 is small, then the average of these two values will become the currently derived control input value, which will be used for control purposes. In the example of FIG. 22A, the value AD2 which is the largest of the three values (due to the effects of noise) will have a substantial effect upon the currently derived control input value, so that it is possible for noise to have a significant effect upon the control operation.
In the case of reference 3, FIG. 22B illustrates a condition in which an immediately precedingly derived control input value (obtained as an average, as described above) is designated as ADOLD, and the set of A/D converted values that are currently being examined are designated as ADNEW1, ADNEW 2, ADNEW3, with these values decreasing monotonically. FIG. 22C on the other hand illustrates a condition in which one of the set of three A/D converted values (ADNEW3) is abnormally high, due to noise, and approaches the magnitude of ADOLD. As a result, this abnormally high value ADNEW3 will be selected as a valid result, and so will be used as the currently derived control input value. Furthermore, as a result of this, the abnormally high value ADNEW3 will become the reference value which is used for comparison with the next set of A/D converted values, to determine the next control input value. Hence, the effects of even a single abnormal A/D converted value due to noise may propagate to subsequent processing that is performed for deriving successive control input values.